<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Declares the attribute specified by node to be of type ID</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domelement.setidattribute.html">DOMElement::setIdAttribute</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domelement.setidattributens.html">DOMElement::setIdAttributeNS</a></div>
 <div class="up"><a href="class.domelement.html">DOMElement</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="domelement.setidattributenode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DOMElement::setIdAttributeNode</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DOMElement::setIdAttributeNode</span> &mdash; <span class="dc-title">Declares the attribute specified by node to be of type ID</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-domelement.setidattributenode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>DOMElement::setIdAttributeNode</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.domattr.html" class="type DOMAttr">DOMAttr</a></span> <code class="parameter">$attr</code></span>
   , <span class="methodparam"><span class="type">bool</span> <code class="parameter">$isId</code></span>
   )</div>

  <p class="para rdfs-comment">
   Declares the attribute specified by <em><code class="parameter">attr</code></em> to be of
   type ID.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-domelement.setidattributenode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">attr</code></em></dt>

     <dd>

      <p class="para">
       The attribute node.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">isId</code></em></dt>

     <dd>

      <p class="para">
       Set it to <strong><code>TRUE</code></strong> if you want <em><code class="parameter">name</code></em> to be of type
       ID, <strong><code>FALSE</code></strong> otherwise.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-domelement.setidattributenode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

 
 <div class="refsect1 errors" id="refsect1-domelement.setidattributenode-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">
   <dl>

    
     <dt>
<strong><code>DOM_NO_MODIFICATION_ALLOWED_ERR</code></strong></dt>

     <dd>

      <p class="para">
       Raised if the node is readonly.
      </p>
     </dd>

    
    
     <dt>
<strong><code>DOM_NOT_FOUND</code></strong></dt>

     <dd>

      <p class="para">
       Raised if <em><code class="parameter">name</code></em> is not an attribute of this element.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-domelement.setidattributenode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="domdocument.getelementbyid.html" class="methodname" rel="rdfs-seeAlso">DOMDocument::getElementById()</a> - Searches for an element with a certain id</span></li>
    <li class="member"><span class="methodname"><a href="domelement.setidattribute.html" class="methodname" rel="rdfs-seeAlso">DOMElement::setIdAttribute()</a> - Declares the attribute specified by name to be of type ID</span></li>
    <li class="member"><span class="methodname"><a href="domelement.setidattributens.html" class="methodname" rel="rdfs-seeAlso">DOMElement::setIdAttributeNS()</a> - Declares the attribute specified by local name and namespace URI to be of type ID</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="domelement.setidattribute.html">DOMElement::setIdAttribute</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="domelement.setidattributens.html">DOMElement::setIdAttributeNS</a></div>
 <div class="up"><a href="class.domelement.html">DOMElement</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
